<?php
/* @var $this XdvertController */
/* @var $model Xdvert */

$this->breadcrumbs=array(
	'Xdverts'=>array('index'),
	$model->id,
);

$this->menu=array(
	array('label'=>'广告列表', 'url'=>array('admin')),
	array('label'=>'创建广告', 'url'=>array('create')),
);
     
    if($model->xdtype == '图片轮播图' || $model->xdtype == '门户轮播图'){  
        $showlable=array( 
            'title',
             array(
                'name'=>'picture',
                'value'=>CHtml::image(".".$model->picture,'',array("width"=>420)), 
                'type'=>'raw',   //这里是原型输出 
                ), 
           
            'xdtype', 
            'company.title',
            'hit', 
            array(
                'name' => 'usable', 
                'value' => ($model->usable == 1?"启用":"未启用"),
                ),
             'url',
        );
    }else if($model->xdtype == '推荐视频'){ 
         $showlable=array( 
            'title',
             array(
            'name'=>'picture',
            'value'=>'<video controls="controls" width="450"><source src="'.Yii::app()->request->baseUrl.$model->picture.'" type="video/mp4"></video>', 
             'type'=>'raw',   //这里是原型输出 
           ),
           array(
            'name'=>'thumbnails',
            'value'=>CHtml::image(".".$model->thumbnails,'',array("height"=>294)), 
             'type'=>'raw',   //这里是原型输出 
            ), 
           
            'xdtype', 
            'company.title',
            'hit', 
            array(
                'name' => 'usable', 
                'value' => ($model->usable == 1?"启用":"未启用"),
                ),
             'url',
        );
    }else{ 
        $showlable=array( 
            'title',
             array(
                'name'=>'picture',
                'value'=>'<video controls="controls" width="450"><source src="'.Yii::app()->request->baseUrl.$model->picture.'" type="video/mp4"></video>', 
                 'type'=>'raw',   //这里是原型输出 
            ), 
            
            'xdtype', 
            'company.title',
            'hit', 
            array(
                'name' => 'usable', 
                'value' => ($model->usable == 1?"启用":"未启用"),
                ),
            'url',
        );
    } 
?>

<h1>显示<?php echo $title;?> </h1>

<div class="Action">
    <a href="<?php echo Yii::app()->request->urlReferrer; ?>"><img src="<?php echo Yii::app()->request->baseUrl; ?>/images/admin/jiantou.png" style=""></a>
</div>

<?php $this->widget('zii.widgets.CDetailView', array(
    'data'=>$model,
    'itemCssClass'=>array('oddtablscss', 'eventablecss'), 
	'attributes'=>$showlable,
)); ?>
